<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateVoteSurveyQuestionsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('survey_questions', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键');
			$table->integer('survey_id')->unsigned()->comment('关联问卷表');
			$table->string('title')->index('title')->comment('题目');
			$table->string('type', 20)->comment('题目类型');
			$table->boolean('cate_id')->comment('题目分类');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('vote_survey_questions');
	}

}
